package com.finance.cooperate.data.base;

import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

/**
 * @ClassName ReaderThreadPool
 * @Description 处理 Reader 线程池
 * @Author shen
 * @Date 2023/8/10 18:08
 * @Modify ...
 */
public class ReaderThreadPool {


    private ExecutorService threadPool = Executors.newFixedThreadPool(10);

    public ExecutorService getThreadPool() {
        return threadPool;
    }

    private static class Singleton {

        private static ReaderThreadPool instance;

        static {
            instance = new ReaderThreadPool();
        }

        public static ReaderThreadPool getInstance() {
            return instance;
        }
    }

    public static ReaderThreadPool getInstance() {
        return Singleton.getInstance();
    }

    public static void init() {

        getInstance();
    }


}
